﻿using System;
using System.ComponentModel.DataAnnotations;
using Util.Domains.Repositories;

namespace IterationLife.Domains.Sports.Queries {
    /// <summary>
    /// 体育比赛查询实体
    /// </summary>
    public class SportEventQuery : QueryEntityBase {
        /// <summary>
        /// 体育比赛编号
        /// </summary>
        [Display(Name="体育比赛编号")]
        public Guid? SportEventId { get; set; }
        
        private string _partnerEventId = string.Empty;
        /// <summary>
        /// 合作放比赛Id
        /// </summary>
        [Display(Name="合作放比赛Id")]
        public string PartnerEventId {
            get { return _partnerEventId == null ? string.Empty : _partnerEventId.Trim(); }
            set{ _partnerEventId=value;}
        }
        /// <summary>
        /// 比赛类型
        /// </summary>
        [Display(Name="比赛类型")]
        public int? EventType { get; set; }
        /// <summary>
        /// 起始开始时间
        /// </summary>
        [Display( Name = "起始开始时间" )]
        public DateTime? BeginStartTime { get; set; }
        /// <summary>
        /// 结束开始时间
        /// </summary>
        [Display( Name = "结束开始时间" )]
        public DateTime? EndStartTime { get; set; }        
        /// <summary>
        /// 起始结束时间
        /// </summary>
        [Display( Name = "起始结束时间" )]
        public DateTime? BeginEndTime { get; set; }
        /// <summary>
        /// 结束结束时间
        /// </summary>
        [Display( Name = "结束结束时间" )]
        public DateTime? EndEndTime { get; set; }        
        
        private string _weather = string.Empty;
        /// <summary>
        /// 天气
        /// </summary>
        [Display(Name="天气")]
        public string Weather {
            get { return _weather == null ? string.Empty : _weather.Trim(); }
            set{ _weather=value;}
        }
        
        private string _humidity = string.Empty;
        /// <summary>
        /// 湿度
        /// </summary>
        [Display(Name="湿度")]
        public string Humidity {
            get { return _humidity == null ? string.Empty : _humidity.Trim(); }
            set{ _humidity=value;}
        }
        
        private string _temperature = string.Empty;
        /// <summary>
        /// 温度
        /// </summary>
        [Display(Name="温度")]
        public string Temperature {
            get { return _temperature == null ? string.Empty : _temperature.Trim(); }
            set{ _temperature=value;}
        }
        
        private string _grassType = string.Empty;
        /// <summary>
        /// 场地类型
        /// </summary>
        [Display(Name="场地类型")]
        public string GrassType {
            get { return _grassType == null ? string.Empty : _grassType.Trim(); }
            set{ _grassType=value;}
        }
        /// <summary>
        /// 人数
        /// </summary>
        [Display(Name="人数")]
        public int? PersonCnt { get; set; }
        
        private string _fieldPlace = string.Empty;
        /// <summary>
        /// 定位
        /// </summary>
        [Display(Name="定位")]
        public string FieldPlace {
            get { return _fieldPlace == null ? string.Empty : _fieldPlace.Trim(); }
            set{ _fieldPlace=value;}
        }
        
        private string _fieldName = string.Empty;
        /// <summary>
        /// 球场名称
        /// </summary>
        [Display(Name="球场名称")]
        public string FieldName {
            get { return _fieldName == null ? string.Empty : _fieldName.Trim(); }
            set{ _fieldName=value;}
        }
        
        private string _jsonData = string.Empty;
        /// <summary>
        /// 全场数据
        /// </summary>
        [Display(Name="全场数据")]
        public string JsonData {
            get { return _jsonData == null ? string.Empty : _jsonData.Trim(); }
            set{ _jsonData=value;}
        }
        /// <summary>
        /// 起始创建时间
        /// </summary>
        [Display( Name = "起始创建时间" )]
        public DateTime? BeginCreationTime { get; set; }
        /// <summary>
        /// 结束创建时间
        /// </summary>
        [Display( Name = "结束创建时间" )]
        public DateTime? EndCreationTime { get; set; }        
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name="创建人")]
        public Guid? CreatorId { get; set; }
        /// <summary>
        /// 起始最后修改时间
        /// </summary>
        [Display( Name = "起始最后修改时间" )]
        public DateTime? BeginLastModificationTime { get; set; }
        /// <summary>
        /// 结束最后修改时间
        /// </summary>
        [Display( Name = "结束最后修改时间" )]
        public DateTime? EndLastModificationTime { get; set; }        
        /// <summary>
        /// 最后修改人
        /// </summary>
        [Display(Name="最后修改人")]
        public Guid? LastModifierId { get; set; }
        
        /// <summary>
        /// 添加描述
        /// </summary>
        protected override void AddDescriptions() {
            base.AddDescriptions();
            AddDescription( "体育比赛编号", SportEventId );
            AddDescription( "合作放比赛Id", PartnerEventId );
            AddDescription( "比赛类型", EventType );
            AddDescription( "起始开始时间", BeginStartTime );
            AddDescription( "结束开始时间", EndStartTime );
            AddDescription( "起始结束时间", BeginEndTime );
            AddDescription( "结束结束时间", EndEndTime );
            AddDescription( "天气", Weather );
            AddDescription( "湿度", Humidity );
            AddDescription( "温度", Temperature );
            AddDescription( "场地类型", GrassType );
            AddDescription( "人数", PersonCnt );
            AddDescription( "定位", FieldPlace );
            AddDescription( "球场名称", FieldName );
            AddDescription( "全场数据", JsonData );
            AddDescription( "起始创建时间", BeginCreationTime );
            AddDescription( "结束创建时间", EndCreationTime );
            AddDescription( "创建人", CreatorId );
            AddDescription( "起始最后修改时间", BeginLastModificationTime );
            AddDescription( "结束最后修改时间", EndLastModificationTime );
            AddDescription( "最后修改人", LastModifierId );
        } 
    }
}
